Match change to the memory/target value, as it is now in KiB, not bytes.
authoremellor@ewan <emellor@ewan>
Wed, 21 Sep 2005 14:12:32 +0000 (15:12 +0100)
committeremellor@ewan <emellor@ewan>
Wed, 21 Sep 2005 14:12:32 +0000 (15:12 +0100)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c

index 521252c8cec5965ba49916d3142bd7d1ddb0bc6a..d720e7d2ea4069a103395e7ba38e47b34eb6d0ce 100644 (file)
@@ -362,7 +362,10 @@ static void watch_target(struct xenbus_watch *watch, const char *node)
                return;
        } 
         
-       set_new_target(new_target >> PAGE_SHIFT);
+       /* The given memory/target value is in KiB, so it needs converting to
+          pages.  PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10.
+       */
+       set_new_target(new_target >> (PAGE_SHIFT - 10));
     
 }